package com.wlyuan.index.domain.source.valueobj;

import com.wlyuan.core.marker.INamed;
import com.wlyuan.core.marker.NamedMap;
import lombok.AllArgsConstructor;
import lombok.Getter;

import java.util.Map;

@Getter
@AllArgsConstructor
public enum SignType implements INamed<Integer> {
    ORDER(0, "平台签收"),
    QRCODE(1, "扫码签收"),
    TRANSPORT(2, "平台签收"),
    CUSTOMER_MP(5, "发货方小程序签收"),
    CARRIER_MP(6, "承运方小程序签收"),
    CONSIGNEE_MP(7, "收货方小程序签收"),
    DEVICE(99, "电子回单自动签收");
    private final Integer value;
    private final String name;

    private static final Map<Integer, SignType> MAP = new NamedMap<>(SignType.class);

    public static SignType valueOf(Integer value) {
        return MAP.get(value);
    }
}